<template>
    <div>
        <div ref="chartRef" style="width: 600px; height: 400px;"></div>
    </div>
</template>

<script setup lang="ts">
import router from '@/router'
import { init } from 'echarts'
import { onMounted, ref } from 'vue';
const chartRef = ref(null)

onMounted(() => {
    const myChart = init(chartRef.value)
    const option = {
        title: {
            text: '示例图表'
        },
        xAxis: {
            data: ['衬衫','羊毛衫']
        },
        yAxis: {},
        series: [
            {
                name:'销量',
                type: 'bar',
                data: [5, 20]
            }
        ]
    }
    myChart.setOption(option)
})

console.log(router)
</script>